<template>
  <!-- 组件的结构 -->
  <div class="school">
    <h2>学校名字:{{ name }}</h2>
    <h2>学校地址:{{ adderss }}</h2>
    <button @click="showMore">展示更多信息</button>
  </div>
</template>

<script>
export default {
    name:'School',
    data() {
        return {
            name:'尚硅谷',
            address:'宏福科技园',
            city:'北京',
            tel:'13888888888'
        }
    },
    methods: {
        showMore(){
            alert(`城市:${this.city},联系电话:${this.tel}`)
        }
    },
};
</script>

<style>
    /* 组件的样式 */
.school{
    background-color: pink;
    padding: 20px;
}
</style>